//
//  CActionSpriteW.h
//  Cocos2dAction
//
//  Created by Hunk on 10-6-28.
//  Copyright 2010 __MyCompanyName__. All rights reserved.
//

#import <Foundation/Foundation.h>

#import "cocos2d.h"


@class CAnimationPlayW;

@interface CActionSpriteW : CCSprite {
	
	float  __frameTime;//the frame speed time;
	
	CAnimationPlayW * __pCCAnimation;
	
	int		__actionIndex;//the ccsprite is the __actionIndex in the role;
	
	int		__currentFrame;//current play the frame index
	
	CGPoint __MainPoint;
	
	float		__doubleTime;//speedUp
	
	BOOL __bCys;
	
	BOOL	__isInPlay;//is playing
}

@property (nonatomic,retain ,readwrite) CAnimationPlayW* __pCCAnimation;
@property(nonatomic ,readwrite) BOOL __bCys;

+(id)node;

-(void)InitChildSprite:(int) ActionIndex Animation:(CAnimationPlayW*)pAnimation  cyc:(BOOL)IsCys;

-(void)InitFrameTime:(float)fTime;

//start to play the animation
-(void)StartPlay;

//animation play the next frame
-(void)PlayNextFrame :(ccTime)dt;


//accelerate the animation play speed. the frame space new time = __frameTime/doubleTime;
-(void)SpeedUpPlay:(int)doubleTime;

-(void)setVisible:(BOOL)v;

//如果是非循环播放,判断是否动画播放完
-(BOOL)IsPlayOver;


@end
